/*  1:   */ package com.atomikos.icatch.imp;
/*  2:   */ 
/*  3:   */ import com.atomikos.icatch.HeurCommitException;
/*  4:   */ import com.atomikos.icatch.HeurHazardException;
/*  5:   */ import com.atomikos.icatch.HeurMixedException;
/*  6:   */ import com.atomikos.icatch.HeuristicMessage;
/*  7:   */ import com.atomikos.icatch.Participant;
/*  8:   */ 
/*  9:   */ class RollbackMessage
/* 10:   */   extends PropagationMessage
/* 11:   */ {
/* 12:42 */   protected int retrycount_ = 0;
/* 13:45 */   protected boolean indoubt_ = false;
/* 14:   */   
/* 15:   */   public RollbackMessage(Participant participant, Result result, boolean indoubt)
/* 16:   */   {
/* 17:52 */     super(participant, result);
/* 18:53 */     this.indoubt_ = indoubt;
/* 19:   */   }
/* 20:   */   
/* 21:   */   protected Object send()
/* 22:   */     throws PropagationException
/* 23:   */   {
/* 24:69 */     Participant part = getParticipant();
/* 25:70 */     HeuristicMessage[] msgs = null;
/* 26:   */     try
/* 27:   */     {
/* 28:72 */       msgs = part.rollback();
/* 29:   */     }
/* 30:   */     catch (HeurCommitException heurc)
/* 31:   */     {
/* 32:76 */       throw new PropagationException(heurc, false);
/* 33:   */     }
/* 34:   */     catch (HeurMixedException heurm)
/* 35:   */     {
/* 36:78 */       throw new PropagationException(heurm, false);
/* 37:   */     }
/* 38:   */     catch (Exception e)
/* 39:   */     {
/* 40:83 */       if (this.indoubt_)
/* 41:   */       {
/* 42:87 */         HeurHazardException heurh = new HeurHazardException(part.getHeuristicMessages());
/* 43:   */         
/* 44:89 */         throw new PropagationException(heurh, true);
/* 45:   */       }
/* 46:   */     }
/* 47:92 */     return msgs;
/* 48:   */   }
/* 49:   */   
/* 50:   */   public String toString()
/* 51:   */   {
/* 52:97 */     return "RollbackMessage to " + getParticipant();
/* 53:   */   }
/* 54:   */ }


/* Location:           C:\myfile\mysoft\apache-maven-3.5.0-bin\apache-maven-3.5.0\myrep\com\atomikos\transactions\3.7.0\transactions-3.7.0.jar
 * Qualified Name:     com.atomikos.icatch.imp.RollbackMessage
 * JD-Core Version:    0.7.0.1
 */